/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Lab4_Homework;
import java.io.*;
import java.util.*;
/**
 *
 * @author THIEN
 */
public class SupermarketDemo extends Supermarket_implements {

//main method
    public static void main(String args[])
    {
        int i,choice;
        Supermarket_implements SI = new Supermarket_implements();
        
        //menu
        while(true)
        {
        Scanner scan = new Scanner(System.in);
        System.out.println("Welcome to Pico plaza");
        System.out.println("\t1. View all products.");
        System.out.println("\t2. Compare 2 products.");
        System.out.println("\t3. Exit");
        System.out.print("Enter your choice: ");
        choice = scan.nextInt();
        switch(choice)
        {
            case 1:
            {
                    SI.view();
                    break;
            }
            case 2:
            {
                    SI.compare();
                    
                    break;
            }
            case 3:
                    System.exit(0);
            default:
                    System.out.println("Your choice is invalid. Try again");
        }
        }
    }



}
